<template>
  <NuxtLayout name="content">
    <template v-for="(item, index) in blockList" :key="index">
      <BlockArchive :title="item.year" :list="item.list" />
    </template>
  </NuxtLayout>
</template>

<script setup lang="ts">
import { type Archive, findArchive } from "~/api/post";
useHead({
  title: "档案", //网站标题
});
const blockList = ref<Archive[]>([]);
const getArchive = async () => {
  const res = await findArchive();
  if (res?.data) {
    blockList.value = res.data;
  }
};
getArchive();

</script>
<style scoped></style>
